import styles from './index.module.scss'
type props = {
  hideList: () => void
  type: '' | 'gender' | 'photo'
  onUpdata: (key: string, value: string) => void
}
const EditList = ({ hideList, type, onUpdata }: props) => {
  return (
    <div className={styles.root}>
      {type === 'gender' ? (
        <>
          {' '}
          <div className="list-item" onClick={() => onUpdata('gender', '0')}>
            男
          </div>
          <div className="list-item" onClick={() => onUpdata('gender', '1')}>
            女
          </div>
        </>
      ) : (
        <>
          {' '}
          <div className="list-item">拍照</div>
          <div className="list-item" onClick={() => onUpdata('photo', '')}>
            本地上传
          </div>
        </>
      )}

      <div className="list-item" onClick={hideList}>
        取消
      </div>
    </div>
  )
}

export default EditList
